using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;

namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class TopRotatorPromotionMap : EntityTypeConfiguration<TopRotatorPromotion>
    {
        public TopRotatorPromotionMap()
        {
            // Primary Key
            this.HasKey(t => t.TopRotatorPromotion_id);

            // Properties
            this.Property(t => t.HeadLine)
                .HasMaxLength(50);

            this.Property(t => t.LocalHeadLine)
                .HasMaxLength(50);

            this.Property(t => t.Description)
                .HasMaxLength(120);

            this.Property(t => t.LocalDescription)
                .HasMaxLength(120);

            this.Property(t => t.ActionBtnTxt)
                .HasMaxLength(20);

            this.Property(t => t.LocalActionBtnTxt)
                .HasMaxLength(20);

            this.Property(t => t.PopupDescription)
                .HasMaxLength(2400);

            this.Property(t => t.LocalPopupDescription)
                .HasMaxLength(2400);

            this.Property(t => t.Description1)
                .HasMaxLength(80);

            this.Property(t => t.LocalDescription1)
                .HasMaxLength(80);

            this.Property(t => t.Description2)
                .HasMaxLength(80);

            this.Property(t => t.LocalDescription2)
                .HasMaxLength(80);

            this.Property(t => t.Description3)
                .HasMaxLength(80);

            this.Property(t => t.LocalDescription3)
                .HasMaxLength(80);

            this.Property(t => t.Description4)
                .HasMaxLength(80);

            this.Property(t => t.LocalDescription4)
                .HasMaxLength(80);

            this.Property(t => t.LeadsTitle)
                .HasMaxLength(120);

            this.Property(t => t.LocalLeadsTitle)
                .HasMaxLength(120);

            this.Property(t => t.LeadsSubTitle)
                .HasMaxLength(120);

            this.Property(t => t.LocalLeadsSubTitle)
                .HasMaxLength(120);

            this.Property(t => t.LPLink)
                .HasMaxLength(200);

            this.Property(t => t.RUCampaignRuleLink)
                .HasMaxLength(200);

            this.Property(t => t.PinkBannerDescription)
                .HasMaxLength(80);

            this.Property(t => t.LocalPinkBannerDescription)
                .HasMaxLength(80);

            // Table & Column Mappings
            this.ToTable("TopRotatorPromotion");
            this.Property(t => t.TopRotatorPromotion_id).HasColumnName("TopRotatorPromotion_id");
            this.Property(t => t.HeadLine).HasColumnName("HeadLine");
            this.Property(t => t.LocalHeadLine).HasColumnName("LocalHeadLine");
            this.Property(t => t.Description).HasColumnName("Description");
            this.Property(t => t.LocalDescription).HasColumnName("LocalDescription");
            this.Property(t => t.ActionBtnTxt).HasColumnName("ActionBtnTxt");
            this.Property(t => t.LocalActionBtnTxt).HasColumnName("LocalActionBtnTxt");
            this.Property(t => t.PopupDescription).HasColumnName("PopupDescription");
            this.Property(t => t.LocalPopupDescription).HasColumnName("LocalPopupDescription");
            this.Property(t => t.PublishDate).HasColumnName("PublishDate");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
            this.Property(t => t.Description1).HasColumnName("Description1");
            this.Property(t => t.LocalDescription1).HasColumnName("LocalDescription1");
            this.Property(t => t.Description2).HasColumnName("Description2");
            this.Property(t => t.LocalDescription2).HasColumnName("LocalDescription2");
            this.Property(t => t.Description3).HasColumnName("Description3");
            this.Property(t => t.LocalDescription3).HasColumnName("LocalDescription3");
            this.Property(t => t.Description4).HasColumnName("Description4");
            this.Property(t => t.LocalDescription4).HasColumnName("LocalDescription4");
            this.Property(t => t.LeadsTitle).HasColumnName("LeadsTitle");
            this.Property(t => t.LocalLeadsTitle).HasColumnName("LocalLeadsTitle");
            this.Property(t => t.LeadsSubTitle).HasColumnName("LeadsSubTitle");
            this.Property(t => t.LocalLeadsSubTitle).HasColumnName("LocalLeadsSubTitle");
            this.Property(t => t.LPLink).HasColumnName("LPLink");
            this.Property(t => t.RUCampaignRuleLink).HasColumnName("RUCampaignRuleLink");
            this.Property(t => t.PinkBannerDescription).HasColumnName("PinkBannerDescription");
            this.Property(t => t.LocalPinkBannerDescription).HasColumnName("LocalPinkBannerDescription");
        }
    }
}
